package com.itheima.blog.auth.controller;


import com.itheima.blog.auth.entity.AdminUser;
import com.itheima.blog.auth.service.AdminUserService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zwp
 * @since 2023-07-12
 */
@RestController
@RequestMapping("/auth/adminUser")
@RequiredArgsConstructor
public class AdminUserController {
    private final AdminUserService iAdminUserService;
    @ApiOperation("通过id得到AdminUser")
    @GetMapping("/{id}")
    public AdminUser getAdminUserById(@PathVariable(value = "id")Integer id){
        AdminUser byId = iAdminUserService.getById(id);
        return byId;
    }
}
